import { defineStore } from 'pinia';

export const useSettingStore = defineStore('setting', () => {
    const breadcrumbs = ref<string[]>([]);
    // 侧边栏是否折叠，默认false
    const isAsideCollapse = ref<boolean>(false);
    function updateBreadcrumbs(_breadcrumbs: string[]) {
        breadcrumbs.value = _breadcrumbs;
    }
    function switchAsideCollapse() {
        isAsideCollapse.value = !isAsideCollapse.value;
    }
    return {
        breadcrumbs,
        isAsideCollapse,
        updateBreadcrumbs,
        switchAsideCollapse,
    };
});
